<template>
	<view class="content">
		<navbar left-text="返回" titleText="空框管理" />
		<view class="tag">
			<view class="tags" v-for="item in dataList" :key="item.id" @click="goDetail(item)">
				<image :src="item.imgUrl" alt="">
					<span>{{item.text}}</span>
			</view>
		</view>
	</view>
</template>

<script>
	import navbar from '@/components/navbar.vue'
	export default {
		data() {
			return {
				title: 'Empty',
				dataList: [{
						id: 1,
						text: '入空容器',
						imgUrl: '/static/imgs/ruku.png',
						routeName: 'empty_in'
					},
					{
						id: 2,
						text: '出空容器',
						imgUrl: '/static/imgs/chuku.png',
						routeName: 'empty_ot'
					}
				]
			}
		},
		components: {
			// tabbar,
			navbar
		},
		methods: {
			goDetail(item) {
				uni.navigateTo({
					url: `/pages/wms/empty/${item.routeName}/index`
				})
			}
		}
	}
</script>

<style lang="scss">
	.content {
		display: flex;
		flex-wrap: wrap;

		.tag {
			margin-top: 50px;
			display: flex;
			flex-wrap: wrap;
			max-height: calc(100vh - 100px);
			overflow: auto;
		}

		.tags {
			width: 375rpx;
			height: 150px;
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			border-bottom: 1px solid #dadadc;
			border-right: 1px solid #dadadc;
			box-sizing: border-box;
			color: #337ab7;
			font-size: 30rpx;

			image {
				width: 80px;
				height: 80px;
			}
		}
	}
</style>